<template>
  <div class="app-container expert-container">
    <div class="expert-header">
      <h2 class="page-title">
        <i class="el-icon-user-solid"></i>
        知识专家
      </h2>
      <p class="page-desc">汇聚农业领域权威专家，为您提供专业的知识服务</p>
    </div>

    <div class="expert-content">
      <el-row :gutter="24">
        <el-col :xs="24" :sm="12" :md="8" :lg="6" v-for="(expert, index) in expertList" :key="index">
          <div class="expert-card">
            <div class="expert-avatar">
              <img :src="expert.avatar" :alt="expert.name" />
              <div class="expert-badge" v-if="expert.isTop">
                <i class="el-icon-star-on"></i>
              </div>
            </div>
            <div class="expert-info">
              <h3 class="expert-name">{{ expert.name }}</h3>
              <p class="expert-title">{{ expert.title }}</p>
              <p class="expert-org">{{ expert.organization }}</p>
              <div class="expert-tags">
                <el-tag v-for="(tag, tagIndex) in expert.tags" :key="tagIndex" size="small" type="info">
                  {{ tag }}
                </el-tag>
              </div>
              <div class="expert-stats">
                <span class="stat-item">
                  <i class="el-icon-video-camera"></i>
                  {{ expert.courseCount }} 课程
                </span>
                <span class="stat-item">
                  <i class="el-icon-view"></i>
                  {{ expert.viewCount }} 浏览
                </span>
              </div>
            </div>
          </div>
        </el-col>
      </el-row>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Expert',
  data() {
    return {
      expertList: [
        {
          name: '张教授',
          title: '农业技术专家',
          organization: '中国农业科学院',
          avatar: 'https://via.placeholder.com/150',
          tags: ['种植技术', '土壤改良'],
          courseCount: 12,
          viewCount: 3560,
          isTop: true
        },
        {
          name: '李博士',
          title: '农业经济专家',
          organization: '农业大学',
          avatar: 'https://via.placeholder.com/150',
          tags: ['农业经济', '市场分析'],
          courseCount: 8,
          viewCount: 2890,
          isTop: false
        },
        {
          name: '王研究员',
          title: '农业生态专家',
          organization: '农业研究所',
          avatar: 'https://via.placeholder.com/150',
          tags: ['生态农业', '有机种植'],
          courseCount: 15,
          viewCount: 4520,
          isTop: true
        },
        {
          name: '刘专家',
          title: '农业机械专家',
          organization: '农机研究院',
          avatar: 'https://via.placeholder.com/150',
          tags: ['农业机械', '智能设备'],
          courseCount: 10,
          viewCount: 3210,
          isTop: false
        },
        {
          name: '陈农艺师',
          title: '农业育种专家',
          organization: '种子公司',
          avatar: 'https://via.placeholder.com/150',
          tags: ['品种选育', '良种推广'],
          courseCount: 6,
          viewCount: 2100,
          isTop: false
        },
        {
          name: '赵高级农艺师',
          title: '农业植保专家',
          organization: '植保站',
          avatar: 'https://via.placeholder.com/150',
          tags: ['病虫害防治', '农药使用'],
          courseCount: 9,
          viewCount: 3780,
          isTop: true
        },
        {
          name: '孙教授',
          title: '农业信息化专家',
          organization: '农业信息中心',
          avatar: 'https://via.placeholder.com/150',
          tags: ['智慧农业', '物联网'],
          courseCount: 11,
          viewCount: 4120,
          isTop: false
        },
        {
          name: '周农技专家',
          title: '农业推广专家',
          organization: '农技推广站',
          avatar: 'https://via.placeholder.com/150',
          tags: ['技术推广', '农民培训'],
          courseCount: 7,
          viewCount: 2560,
          isTop: false
        }
      ]
    }
  }
}
</script>

<style lang="scss" scoped>
.expert-container {
  background: #f0f2f5;
  padding: 24px;
  
  .expert-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 32px;
    border-radius: 12px;
    margin-bottom: 24px;
    color: #fff;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    
    .page-title {
      font-size: 32px;
      font-weight: 600;
      margin: 0 0 12px 0;
      display: flex;
      align-items: center;
      gap: 12px;
      
      i {
        font-size: 36px;
      }
    }
    
    .page-desc {
      font-size: 16px;
      margin: 0;
      opacity: 0.9;
    }
  }
  
  .expert-content {
    .expert-card {
      background: #fff;
      border-radius: 12px;
      padding: 24px;
      margin-bottom: 24px;
      transition: all 0.3s ease;
      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
      cursor: pointer;
      
      &:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
      }
      
      .expert-avatar {
        position: relative;
        width: 120px;
        height: 120px;
        margin: 0 auto 20px;
        
        img {
          width: 100%;
          height: 100%;
          border-radius: 50%;
          object-fit: cover;
          border: 4px solid #f0f2f5;
        }
        
        .expert-badge {
          position: absolute;
          top: -4px;
          right: -4px;
          background: #ff6b6b;
          color: #fff;
          width: 32px;
          height: 32px;
          border-radius: 50%;
          display: flex;
          align-items: center;
          justify-content: center;
          font-size: 16px;
          box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
        }
      }
      
      .expert-info {
        text-align: center;
        
        .expert-name {
          font-size: 20px;
          font-weight: 600;
          color: #303133;
          margin: 0 0 8px 0;
        }
        
        .expert-title {
          font-size: 14px;
          color: #409EFF;
          font-weight: 500;
          margin: 0 0 6px 0;
        }
        
        .expert-org {
          font-size: 13px;
          color: #909399;
          margin: 0 0 12px 0;
        }
        
        .expert-tags {
          margin-bottom: 16px;
          
          .el-tag {
            margin: 4px;
          }
        }
        
        .expert-stats {
          display: flex;
          justify-content: center;
          gap: 20px;
          padding-top: 16px;
          border-top: 1px solid #f0f2f5;
          
          .stat-item {
            font-size: 13px;
            color: #909399;
            display: flex;
            align-items: center;
            gap: 4px;
            
            i {
              color: #409EFF;
            }
          }
        }
      }
    }
  }
}

@media (max-width: 768px) {
  .expert-container {
    padding: 16px;
    
    .expert-header {
      padding: 24px 20px;
      
      .page-title {
        font-size: 24px;
      }
    }
  }
}
</style>